package exception;

//1.继承Exception
public class MyException extends Exception{
	//2.创建私有属性
	private int code;
	//3.调用父类的构造方法
	public MyException(String message,int code) {
		super(message);
		this.code = code;
	}
	//生成 get,set
	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	} 
}
